home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / bildschirmschoner / bserver_v1.5 / sources.lha / Sources / server / builtin_blanker.c < prev    next >
C/C++ Source or Header  |  1995-11-08  |  784b  |  48 lines

  1. #include <intuition/intuition.h>
  2. #include <hardware/custom.h>
  3. #include <hardware/dmabits.h>
  4. #include <graphics/gfxmacros.h>
  5.  
  6. #include <clib/macros.h>
  7. #include <proto/intuition.h>
  8. #include <proto/graphics.h>
  9.  
  10.  /***************
  11.  *              *
  12.  * SCREEN STUFF *
  13.  *              *
  14.  ***************/
  15.  
  16. #define custom (*((struct Custom *)0xDFF000L))
  17.  
  18. static struct Screen *blackScr;
  19. extern ULONG DisplayID;
  20.  
  21. BOOL PopUpBlackScreen( void )
  22. {
  23. if ( blackScr )
  24.     return( TRUE );
  25.  
  26. if ( blackScr = OpenScreenTags( NULL,
  27.                 SA_DisplayID, DisplayID,
  28.                 SA_Depth, 0,
  29.                 TAG_END ) )
  30.     {
  31.     OFF_SPRITE
  32.     SetRGB4( &(blackScr->ViewPort), 0, 0, 0, 0 );
  33.     return( TRUE );
  34.     }
  35. return( FALSE );
  36. }
  37.  
  38.  
  39. void CloseBlackScreen( void )
  40. {
  41. if ( blackScr )
  42.     {
  43.     ON_SPRITE
  44.     CloseScreen( blackScr );
  45.     blackScr = NULL;
  46.     }
  47. }
  48.